<?php
/*
*  baseStruct这个基类是用来处理基本的数据结构的,只包括一些常用的函数等等,
*  baseFunction这个基类就抽象到了函数级别了
*/
	
	abstract class baseFunction extends baseStruct{
		abstract function getFunctionName();
		abstract function getFunctionArg();
		abstract function getFunctionConent();
		
		
		function create(){
			$this->replaceFunctionName();
			$this->replaceFunctionArg();
			$this->replaceFunctionConent();
		}
		function replaceFunctionName(){
			$this->replace('[functionName]',$this->getFunctionName());	
			return $this;
		}
		function replaceFunctionArg(){
			$this->replace('[functionArg]',$this->getFunctionArg());	
			return $this;	
		}
		function replaceFunctionConent(){
			$this->replace('[functionContent]',$this->getFunctionConent());	
			return $this;	
		}
		function getDefults(){
			return "function [functionName]([functionArg]){
				[functionContent]	
			}";	
		}
		function getResults(){
			$this->create();
			return $this->Thmplate;	
		}
		
	}